package com.jinyu.dao.entity.sys;

import jakarta.validation.constraints.Pattern;

import java.io.Serial;
import java.io.Serializable;

/**
 * @Author: yangli
 * @Despriction:    菜单信息模型
 * @Package: com.jinyu.dao.entity.sys
 * @Date:Created in 2022/5/7 21:55
 * @Modify By:
 */
public class SysMenu implements Serializable {

    @Serial
    private static final long serialVersionUID = 6730751985202154076L;

    /**
     *  主键id
     */
    private Long id;


    /**
     *  菜单标题
     */
    @Pattern(regexp = "^(?!_)(?!.*?_$)[0-9a-zA-Z_\\u4e00-\\u9fa5]{1,20}$",message = "菜单标题必须是由汉字、英文、数字、下划线组成，且下划线不能在头部或者末尾")
    private String menuTitle;


    /**
     *  菜单编码
     */
    @Pattern(regexp = "^(?!_)(?!.*?_$)[0-9a-zA-Z_]{1,20}$",message = "菜单编码必须是由英文、数字、下划线组成，且下划线不能在头部或者末尾")
    private String menuCode;


    /**
     *  父级菜单id
     */
    private String pid;


    /**
     *  菜单顺序
     */
    private Integer orderNum;


    /**
     *  路由路径
     */
    private String path;


    /**
     *  组件路径
     */
    private String component;


    /**
     *  菜单图标
     */
    private String icon;


    /**
     *  菜单类型(0:菜单目录；1:菜单页面)
     */
    private Integer menuType = 0;


    /**
     *  是否外链菜单(0:否；1:是)
     */
    private Integer frameFlag = 0;


    /**
     *  是否显示(0:隐藏；1:显示)
     */
    private Integer visible = 1;


    /**
     *  菜单状态(0:正常；1:停用)
     */
    private Integer status = 0;


    /**
     *  创建时间
     */
    private String createTime;


    /**
     *  创建人
     */
    private String createUser;


    /**
     *  修改时间
     */
    private String updateTime;


    /**
     *  修改人
     */
    private String updateUser;


    /**
     *  删除标志(0：未删除；1：已删除)
     */
    private Integer delFlag = 0;


    /**
     *  备注
     */
    private String remark;

    @Override
    public String toString() {
        return "SysMenu{" +
                "id=" + id +
                ", menuTitle='" + menuTitle + '\'' +
                ", menuCode='" + menuCode + '\'' +
                ", pid=" + pid +
                ", orderNum=" + orderNum +
                ", path='" + path + '\'' +
                ", component='" + component + '\'' +
                ", icon='" + icon + '\'' +
                ", menuType=" + menuType +
                ", frameFlag=" + frameFlag +
                ", visible=" + visible +
                ", status=" + status +
                ", createTime='" + createTime + '\'' +
                ", createUser='" + createUser + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", updateUser='" + updateUser + '\'' +
                ", delFlag=" + delFlag +
                ", remark='" + remark + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMenuTitle() {
        return menuTitle;
    }

    public void setMenuTitle(String menuTitle) {
        this.menuTitle = menuTitle;
    }

    public String getMenuCode() {
        return menuCode;
    }

    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getMenuType() {
        return menuType;
    }

    public void setMenuType(Integer menuType) {
        this.menuType = menuType;
    }

    public Integer getFrameFlag() {
        return frameFlag;
    }

    public void setFrameFlag(Integer frameFlag) {
        this.frameFlag = frameFlag;
    }

    public Integer getVisible() {
        return visible;
    }

    public void setVisible(Integer visible) {
        this.visible = visible;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
